public class Demo3 {
}

sealed class Shape permits Rect, CirCle, Triangle{

}

final class Rect extends Shape{

}

final class CirCle extends Shape{

}

final class Triangle extends Shape{

}


